Dating HIV integration events
|
|
Root-to-tip regression
|
|
|
|
The RTT regression model has three parameters:
We will sample these parameters from the posterior distribution.
\[\log L(Y_i, \Delta t_i) = \sum_i Y_i\log(\mu \Delta t_i) - \mu \Delta t_i - \log \Gamma(Y_i+1)\]
| Parameter | Prior | Proposal |
|---|---|---|
| Root | Uniform | \(\textrm{Unif}(-\delta, +\delta)\), reflection on tips and random choice of branches at splits. |
| Clock rate | Lognormal | \(\textrm{Unif}(-\delta, +\delta)\) proposal reflecting on zero. |
| Origin date | Uniform | Truncated normal proposal with mean 0 and variance \(\sigma\). |
|
|
|
Using Bayes’ rule, the probability of integration time \(t_i\) for outgrowth sequence with divergence \(Y_i\) is: \[P(t_i|Y_i) = \frac{P(Y_i|t_i) P(t_i)}{P(Y_i)}\]
We assume \(P(t_i) = \frac{1}{T-t_0}\), where \(t_0\) is the origin date and \(T\) is the maximum integration date, and letting \(s=t-t_0\):
\[ P(Y_i) = \frac{\int_0^{T-t_0} (\mu s)^{Y_i} \exp(-\mu s) \mathrm{d}s}{(T-t_0)\Gamma(Y_i+1)} = \frac{\gamma(Y_i+1, \mu(T-t_0))}{\mu(T-t_0)\Gamma(Y_i+1)} \]
where \(\gamma(s, x)\) is the lower incomplete gamma function.
Letting \(\Lambda=\mu(T-t_0)\), the probability of \(t_i\) given \(y_i\) mutations simplifies to: \[ P(t_i | Y_i) = \frac{\mu \Lambda^{y_i}\exp(-\Lambda)}{\gamma(Y_i+1, \Lambda)} \]
Since we can’t solve for the inverse CDF, we use a simple rejection method to sample integration times.
twt) to simulate cell population dynamics (forward time).
|
|
|
|
twt through INDELible
As.bayroot to root-to-tip regression